//package com.rose.order.controller;
//
//import java.util.Arrays;
//import java.util.Map;
//import java.util.UUID;
//
//import com.rose.order.entity.MqMessageEntity;
//import com.rose.order.service.MqMessageService;
//import org.springframework.amqp.rabbit.connection.CorrelationData;
//import org.springframework.amqp.rabbit.core.RabbitTemplate;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.rose.common.utils.PageUtils;
//import com.rose.common.utils.R;
//
//
//
///**
// *
// *
// * @author rose
// * @email 1942951600@qq.com
// * @date 2021-06-08 16:43:06
// */
////@RestController
////@RequestMapping("order/mqmessage")
////public class MqMessageController {
////    @Autowired
////    private MqMessageService mqMessageService;
////    @Autowired
////    RabbitTemplate rabbitTemplate;
////
////    /**
////     * 列表
////     */
////    @RequestMapping("/list")
////    //@RequiresPermissions("order:mqmessage:list")
////    public R list(@RequestParam Map<String, Object> params){
////        PageUtils page = mqMessageService.queryPage(params);
////
////        return R.ok().put("page", page);
////    }
////    @RequestMapping("/msg")
////    public void testSendMessage(){
////        for (int i = 0; i < 10 ; i++) {
////            rabbitTemplate.convertAndSend("exchange.topic",
////                    "rose.123","hello java"+i,
////                    new CorrelationData(UUID.randomUUID().toString()));
////
////        }
////
////    }
////
////
////    /**
////     * 信息
////     */
////    @RequestMapping("/info/{messageId}")
////    //@RequiresPermissions("order:mqmessage:info")
////    public R info(@PathVariable("messageId") String messageId){
////		MqMessageEntity mqMessage = mqMessageService.getById(messageId);
////
////        return R.ok().put("mqMessage", mqMessage);
////    }
////
////    /**
////     * 保存
////     */
////    @RequestMapping("/save")
////    //@RequiresPermissions("order:mqmessage:save")
////    public R save(@RequestBody MqMessageEntity mqMessage){
////		mqMessageService.save(mqMessage);
////
////        return R.ok();
////    }
////
////    /**
////     * 修改
////     */
////    @RequestMapping("/update")
////    //@RequiresPermissions("order:mqmessage:update")
////    public R update(@RequestBody MqMessageEntity mqMessage){
////		mqMessageService.updateById(mqMessage);
////
////        return R.ok();
////    }
////
////    /**
////     * 删除
////     */
////    @RequestMapping("/delete")
////    //@RequiresPermissions("${moduleNamez}:mqmessage:delete")
////    public R delete(@RequestBody String[] messageIds){
////		mqMessageService.removeByIds(Arrays.asList(messageIds));
////
////        return R.ok();
////    }
////
////}
